package com.server.auth.dto;

import com.server.model.all.constant.PatternConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;


import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@ApiModel
public class SmsLoginDto {

    /***
     * 手机号
     * @author LXC
     * @date 2022/3/13 18:44
     */
    @NotNull(message = "手机号不可为空")
    @Pattern(regexp = PatternConstant.REGEX_MOBILE_EXACT,message = "手机号不合法")
    @ApiModelProperty(value = "手机号")
    private String mobile;

    /**
     * 短信验证码
     * @author LXC
     * @date 2022/3/13 18:44
     */
    @NotNull(message = "短信验证码不可为空")
    @Length(min = 4,max = 4,message = "短信验证码长度必须等于4")
    @ApiModelProperty(value = "短信验证码")
    private String smsCode;

}
